|
|
Here's what I have so far, which errors on the third line of the data file with
"Parse error: Expected 'float, vector, or string literal',, found instead"
//Initialize with safe values
#declare Lines_In_File = 0;
#declare Xval = 1;
#declare Yval = 1;
#declare Zval = 1;
// Sample data, X, Y, Z
//0.128236817,0.17343048,1.06941009
//-0.109255917,-0.005383651,0.765301253
//0.059836132,0.172405022,0.976029181 <--- Errors on this line
//Find how many lines in the file
#fopen MyFile "drop13.csv" read
#while (defined(MyFile))
#read (MyFile,Xval,Yval,Zval)
#declare Lines_In_File=Lines_In_File+1 ;
#end
#fclose MyFile
// Having Lines_In_File now holding the lines count
#declare clock=0;
#declare Count=0;
// Read the Nth line
#declare Read_Line = int((1/Lines_In_File)*clock)
#fopen MyFile "bang.csv" read
#while (defined(MyFile))
#while (Count<Line)
#read (MyFile,Xval,Yval,Zval)
#declare Count=Count+1
#end
#end
#fclose MyFile
Post a reply to this message
|
|